package com.dscs.controller;

import com.dscs.annotation.PermissionAnnotation;
import com.dscs.model.Building;
import com.dscs.service.BuildService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author 叶雪娟
 * @date 2019/7/18
 * @RestController ：@RestController 是spring4里的新注解，是@ResponseBody和@Controller的缩写。
 **/
@RestController
@RequestMapping(value = "/build")
public class BuildingController {

    @Autowired
    BuildService ius;

    /**
     * 查询所有用户信息
     *
     * @return List<User>
     */
    @GetMapping(value = "/queryAllBuilding")
    @PermissionAnnotation(value = true)
    public List<Building> queryAllBuilding() {
        return ius.queryAllBuild();
    }






}
